<html>
<head><meta charset="utf-8"><title>Building test with static std · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Building.20test.20with.20static.20std.html">Building test with static std</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="225303977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Building%20test%20with%20static%20std/near/225303977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Building.20test.20with.20static.20std.html#225303977">(Feb 05 2021 at 14:23)</a>:</h4>
<p>Hello again, I was wondering if it was possible to compile <code>test</code> and related crates in the rust repo, with the static <code>rlib</code> std as opposed to using the dynamic <code>.so</code>/<code>.dll</code>?</p>



<a name="225306452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Building%20test%20with%20static%20std/near/225306452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Building.20test.20with.20static.20std.html#225306452">(Feb 05 2021 at 14:44)</a>:</h4>
<p><code>test</code> is compiled as both rlib and dylib. The rlib should link against <code>libstd.rlib</code> as far as I know.</p>



<a name="225307746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Building%20test%20with%20static%20std/near/225307746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Building.20test.20with.20static.20std.html#225307746">(Feb 05 2021 at 14:53)</a>:</h4>
<p><span class="user-mention" data-user-id="133247">@bjorn3</span> Right, that makes sense. I'll test just removing the <code>dylib</code> in <code>test</code>. Thanks!</p>



<a name="225317966"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Building%20test%20with%20static%20std/near/225317966" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Building.20test.20with.20static.20std.html#225317966">(Feb 05 2021 at 16:05)</a>:</h4>
<p>Yep, this worked perfectly. <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>